package com.hrt.manage.sms.smsRecord.dao.impl;

import org.springframework.stereotype.Repository;

import com.hrt.base.BaseDaoImpl;
import com.hrt.bean.SmsRecord;
import com.hrt.manage.sms.smsRecord.dao.SmsRecordDao;

@Repository("smsRecordManageDao")
public class SmsRecordDaoImpl extends BaseDaoImpl<SmsRecord> implements SmsRecordDao{

	@Override
	public SmsRecord getCodeByMobile(String mobile) {
		String hql = "select sms from SmsRecord sms where sms.mobile='"+mobile+"' and sms.isdelete=0 and isinvalid=0";
		SmsRecord smsRecord= (SmsRecord) getHibernateTemplate().find(hql).get(0);
		return smsRecord;
	}

}
